import { doPyViewInvoke } from './pyview_api'
import { useSiteConfig } from '../store/siteConfig'
import { callBackWebapi } from './webapi'
const siteConfig = useSiteConfig()
export async function callBackApi(method,data,options,loading){
    //console.log(siteConfig.callBackMode)
    if(siteConfig.callBackMode=="pyview"){
        return await doPyViewInvoke(method,data,options,loading)
    }else if(siteConfig.callBackMode=="web"){
        return await callBackWebapi(method,data,options,loading)
    }
    else{
        console.log("no back mode")
        alert('no back mode')
        return ""
    }
}